package com.cx.mall.demo.controller;

import com.cx.mall.demo.entity.Person;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//PersonController personController = new PersonController()
public class PersonController {
    @Autowired // 注解：从容器中取 Person 对象
    private Person person;
    @GetMapping("/person") // 映射 URI
    public String getPerson(){
        return person.toString();
    }
}
